package com.eya.rabbitmq.consumer;

import com.eya.rabbitmq.config.RabbitConfigure;
import com.rabbitmq.client.Channel;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * 消息消费者
 *
 * @auther: luolin
 * @since: 2018/10/25 15:46
 */
@Component
@RabbitListener(queues = RabbitConfigure.SPRING_BOOT_QUEUE)
public class SimpleMessageConsumer1 {


	@RabbitHandler
	public void consume(String content) throws IOException {


		System.out.println("SimpleMessageConsumer1 get message : " + content);
	}


}
